package javaCode.chapter02;

public class 基本类型转换练习 {

    public static void main(String[] args) {
        //short s = 12; 对
        //s = s-9 ; 错误 int -> short

        //byte b = 10; 对
        //b = b + 11; 错误 int -> byte
        //b = (byte)(b+11); 对

        char c = 'a';
         int i = 16 ;
         float d = .314f;
        double result = c + i + d; //对 float -> double
        System.out.println(result);

        // byte b = 16 ;
        // short s = 14;
        //short t = s + b;  错误 int -> short
    }
}
